// 页面加载时从本地存储中读取用户名并显示
window.addEventListener("load", function() {
    var username = localStorage.getItem("username");

    if (username) {
        document.getElementById("username").textContent = username;
    }
});